home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
5
/
DINKDEMO
/
DINKCLAS
/
DSCROLLW.H
< prev
next >
Wrap
Text File
|
1992-07-23
|
2KB
|
90 lines
/*
File: DScrollWindow.h
Written by: Mark Gross
Copyright: ⌐ 1992 by Applied Technical Software, all rights reserved.
Use at your own risk.
*/
// This is the implementation of TScrollDoc subclass in my
// class library.
#ifndef __DSCROLLWINDOW__
#define __DSCROLLWINDOW__
#include "DWindow.h"
class DScrollWindow : public DWindow
{
protected:
short fVMin;
short fVMax;
short fHMin;
short fHMax;
ControlHandle fHorizScrollBar;
ControlHandle fVertScrollBar;
public:
DScrollWindow(void);
~DScrollWindow(void);
virtual Boolean Init(DDocument *doc, Boolean hasColorWindows);
virtual void KillMeNext(void);
virtual void HandleUpdateEvt(EventRecord *theEvent);
virtual void HandleActivateEvt(EventRecord *theEvent);
virtual void HandleOSEvent(EventRecord *theEvent);
// needed to hide the scroll bars when a context switch happens
virtual short GetVertLineScrollAmount(void);
virtual short GetHorizLineScrollAmount(void);
virtual short GetVertPageScrollAmount(void);
virtual short GetHorizPageScrollAmount(void);
protected:
virtual void DoGrow(EventRecord *theEvent);
virtual void DoZoom(short partCode);
virtual void DoContent(EventRecord *theEvent);
void SizeScrollBars(void);
public:
void ValidateScrollRange(void);
void ValidateVertScrollRange(void);
void SynchScrollBars(void);
protected:
void ScrollClick(EventRecord *theEvent);
void DoThumbScroll(ControlHandle theControl, Point localPt);
void DoPageScroll(ControlHandle theControl, short part);
void DoButtonScroll(ControlHandle theControl, Point localPt);
virtual void ScrollContents(short dh, short dv);
public:
void DoHScroll(short change);
void DoVScroll(short change);
static pascal void ActionProc(ControlHandle theControl, short partCont);
};// end of class declaration for TDocRootd
#endif __DSCROLLWINDOW__